#ifndef _CommUtils_H__
#define _CommUtils_H__

class CommUtils 
{
public:
	bool ReadCom(unsigned char * ReceiveData, DWORD& ReceiveLength);
	void CloseCom();
	bool WriteCom(unsigned char * sendchar,int sendsize);
	bool OpenCom(int Port);
	byte Check(unsigned char data[]);

	CommUtils();
	virtual ~CommUtils();
	int m_Port;
	char szCurPath[256];

private:
	OVERLAPPED ReadovReady, WriteovReady;
	HANDLE hComm;
	bool bOpenCom;
};

#endif
